# -*- coding: utf-8 -*-
# @Time    : 2022/7/19 1:12
# @Author  : xhf
# @Email   : xhf9309@163.com
# @File    : run_test_crm_gzt.py
# @Software: PyCharm
import unittest
import time
from config.config import CASES_PATH,REPORTS_PATH
from BeautifulReport import BeautifulReport

suite=unittest.defaultTestLoader.discover(CASES_PATH,'test_crm_gzt.py')
now=time.strftime("%Y%m%d%H%M%S")#设置时间格式
report_name='test-crm-{}.html'.format(now)

runner=BeautifulReport(suite)
runner.report(description="crm工作台自动化测试",
              report_dir=REPORTS_PATH,
              filename=report_name)